Skip to content

Conversation

@zharinov
Copy link
Member

@zharinov zharinov commented Jan 4, 2026

Summary

  • Extract duplicated query setup logic from exec.rs and trace.rs into run_common::prepare_query()
  • Add QueryInput struct for common parameters and PreparedQuery struct for results
  • Reduce exec.rs by 45 lines, trace.rs by 45 lines

Why

Both exec and trace commands had ~55 identical lines for: validate inputs → load query → parse → analyze → link → check diagnostics → emit bytecode → load module → resolve entrypoint → parse tree → build trivia. Consolidating this makes future changes easier and reduces bug surface area.

@zharinov zharinov enabled auto-merge (squash) January 4, 2026 21:02
@zharinov zharinov merged commit f321f13 into master Jan 4, 2026
4 checks passed
@zharinov zharinov deleted the refactor/prepare-query branch January 4, 2026 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants